import {Action, AnyAction} from "redux";

let initialState={
	count:1,
	number:0
}

export default function count_reducer(perState = initialState, action:AnyAction) {
	const{type,data}=action
	switch (type) {
		case "incerment":
			return Object.assign({}, perState, {
				count: perState.count+data
			})
		case 'initFun':
			return Object.assign({},perState,{count:perState.count+data})
		default:
			return perState;
	}
}


